package com.config.bus.client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:RenPu
 * @Date: 2020/9/22 10:33
 * @Version: 1.0
 * @description:
 */

@RestController
public class ConfigController {


    //远程配置属性的引用
    @Value("${name}")
    private String name;

    //1：本地配置文件，同步第三方平台属性值
    //2：读取本地配置文件的值
    @Value("${myWords}")
    private String words;

    @Value("${food}")
    private String food;


    @GetMapping("/name")
    public String getName() {
        return name;
    }


    @GetMapping("/food")
    public String getFood() {
        return food;
    }


    @GetMapping("/words")
    public String getWords() {
        return words;
    }


}
